package day05;

public class homework3 {
    public static void main(String[] args) {
        /*
        int[] arr=new int[10];
        int[] arr1=new int[5];
        int[] arr2={1,3,5,7,9};
        int[] arr3;
        arr3=new int[]{2,4,6,8};


         */
        int[] arr=new int[5];
        System.out.println(arr.length);
        arr[0]=100;
        arr[1]=200;
        arr[2]=300;
        arr[3]=400;
        arr[4]=500;
        System.out.println(arr[arr.length-1]);

        System.out.println("\n遍历:");
        int[] arr1=new int[10];
        for(int i=0;i< arr1.length;i++){
            arr1[i] = (int)(Math.random()*100+1);
            System.out.println(arr1[i]);
        }


    }
}
